//
//  common.swift
//  XinLangWeibo10
//
//  Created by 白利兵 on 15/10/16.
//  Copyright © 2015年 itheima. All rights reserved.
//
// 定义全局属性，类似OC中得pch文件
import UIKit
let GlobalColor = UIColor.orangeColor()
let WBNotificationSwithRootView = "WBNotificationSwithRootView"
let WBLogonChangeRootView = "WBLogonChangeRootView"
/// 选中照片通知
let WBStatusSelectedPhotoNotification = "WBStatusSelectedPhotoNotification"
/// 选中照片的 KEY - IndexPath
let WBStatusSelectedPhotoIndexPathKey = "WBStatusSelectedPhotoIndexPathKey"
/// 选中照片的 KEY - URL 数组
let WBStatusSelectedPhotoURLsKey = "WBStatusSelectedPhotoURLsKey"
// 设置屏幕宽度和高度
let ScreenWidth = UIScreen.mainScreen().bounds.width
let ScreenHeight = UIScreen.mainScreen().bounds.height
// MARK: - 全局函数，可以直接使用
/// 延迟在主线程执行函数
///
/// - parameter delta:    延迟时间
/// - parameter callFunc: 要执行的闭包
func delay(delta: Double, callFunc: ()->()) {
    
    dispatch_after(
        dispatch_time(DISPATCH_TIME_NOW, Int64(delta * Double(NSEC_PER_SEC))),
        dispatch_get_main_queue()) {
            
            callFunc()
}
}